<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <meta http-equiv="x-dns-prefetch-control" content="on">

    <title>选择货物类型</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css">
    <script src="../../js/jquery-v1.11.2.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../js/customer.js"></script>
</head>
<body>
<section class="subtitle mt10 p15">您的货物可归为以下哪类?</section>
<section class="itemgroup p15" id="goodsSection">
 
</section>
<section class="itemgroup mt10 mb56" id="otherSection">
</section>


<input type="hidden" id="vehiclePriceId" name="vehiclePriceId" value=""/>
     <input type="hidden" id="bookDate" name="bookDate" value=""/>
     <input type="hidden" id="consignDesc" name="consignDesc" value=""/>
     <input type="hidden" id="callType" name="callType" value=""/>
     <input type="hidden" id="addrType" name="addrType" value=""/>
     <input type="hidden" id="waybillRquirement10" name="waybillRquirement10" value=""/>
	 <input type="hidden" id="waybillRquirement20" name="waybillRquirement20" value=""/>
	 <input type="hidden" id="waybillRquirement30" name="waybillRquirement30" value=""/>
	      <input type="hidden" id="consignName" name="consignName" value=""/>
     <input type="hidden" id="consignMobile" name="consignMobile" value=""/>
	 
	 <input type="hidden" id="startDistrictCode" name="startDistrictCode" value=""/>
	 <input type="hidden" id="startAddr" name="startAddr" value=""/>
	 <!--startPCD 起点 省市区-->
	 <input type="hidden" id="startPCD" name="startPCD" value=""/>
	 <!-- 起点经纬度 -->
	 <input type="hidden" id="startLocation" name="startLocation" value=""/>
	 
	 <input type="hidden" id="endDistrictCode" name="endDistrictCode" value=""/>
	 <input type="hidden" id="endAddr" name="endAddr" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD" name="endPCD" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation" name="endLocation" value=""/>
	 <input type="hidden" id="vehiclePriceId" name="vehiclePriceId" value=""/>
	 
	  <!-- 第二终点参数 -->
	 
	 <input type="hidden" id="endDistrictCode1" name="endDistrictCode1" value=""/>
	 <input type="hidden" id="endAddr1" name="endAddr1" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD1" name="endPCD1" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation1" name="endLocation1" value=""/>
	 
	 <!-- 第三终点参数 -->
	 <input type="hidden" id="endDistrictCode2" name="endDistrictCode2" value=""/>
	 <input type="hidden" id="endAddr2" name="endAddr2" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD2" name="endPCD2" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation2" name="endLocation2" value=""/>
	 
	 
	 <input type="hidden" id="goodsRemark" name="goodsRemark" value=""/>
	 <input type="hidden" id="goodsType" name="goodsType" value=""/>
	  <input type="hidden" id="goodsTypeName" name="goodsTypeName" value=""/>
	 <input type="hidden" id="consignNum" name="consignNum" value=""/>
	 <input type="hidden" id="endAddrCount" name="endAddrCount" value=""/>
	 <input type="hidden" id="customerUuid" name="customerUuid" />
	 
	  <input type="hidden" id="startStreet" name="startStreet" />
	 <input type="hidden" id="startCross" name="startCross" />
	 <input type="hidden" id="startDoorNo" name="startDoorNo" />
	 <input type="hidden" id="endStreet" name="endStreet" />
	 <input type="hidden" id="endCross" name="endCross" />
	 <input type="hidden" id="endDoorNo" name="endDoorNo" />
	 <input type="hidden" id="acceptPersonMobile" name="acceptPersonMobile" />
	 <input type="hidden" id="acceptPersonName" name="acceptPersonName" />
	 
	  <input type="hidden" id="endStreet1" name="endStreet1" />
	 <input type="hidden" id="endCross1" name="endCross1" />
	 <input type="hidden" id="endDoorNo1" name="endDoorNo1" />
	 <input type="hidden" id="acceptPersonMobile1" name="acceptPersonMobile1" />
	 <input type="hidden" id="acceptPersonName1" name="acceptPersonName1" />
	 
	 <input type="hidden" id="endStreet2" name="endStreet2" />
	 <input type="hidden" id="endCross2" name="endCross2" />
	 <input type="hidden" id="endDoorNo2" name="endDoorNo2" />
	 <input type="hidden" id="acceptPersonMobile2" name="acceptPersonMobile2" />
	 <input type="hidden" id="acceptPersonName2" name="acceptPersonName2" />
	 
	 <input type="hidden" id="planLoadTime" name="planLoadTime" />
	 <input type="hidden" id="planUnloadTime" name="planUnloadTime" />
	 <input type="hidden" id="planLoadFee" name="planLoadFee" />
	 <input type="hidden" id="planUnloadFee" name="planUnloadFee" />
	 <input type="hidden" id="planLowSpeedTime" name="planLowSpeedTime" />
	 <input type="hidden" id="planLowSpeedFee" name="planLowSpeedFee" />
</body>
<script>
$(function (){
	 //token验证
		checkToken();
	}); 
$(function(){
	var LocString = String(window.document.location.href); 
	var addrType=getCookie("addrType"); 
	var customerUuid=getCookie("customerUuid"); 
	 
	 var url = _global.serverHost +"/consignerOrder/selectGoodsType.htm";
	 
     var data = {
    		'customerUuid': customerUuid
     };
     _callAjaxRequest(url, data, callBack);

     function callBack(data) {
    	 cookie2Order();
    	 var goodsTypeList=data.goodsTypeList;
    	 var goodsSection='';
    	 if(goodsTypeList==null || goodsTypeList.length<1){
    		 
    	 }else{
    		 
    		 for(var i=0;i<goodsTypeList.length;i++){
    			 goodsSection=goodsSection+'<div class="oneitem" onclick="selectGoodType(\''+goodsTypeList[i].codeValue+'\',\''+goodsTypeList[i].cvName +'\')">'
    			 +'<i class="iconfont mr5 blue icon20">'+goodsTypeList[i].pv1+'</i>'
    			 +goodsTypeList[i].cvName ;
    			 var goodsType=getCookie("goodsType"); 
    			 if(goodsType!=undefined && goodsType==goodsTypeList[i].codeValue){
    				 goodsSection=goodsSection+' <i class="iconfont rightsmallicon_red">&#xe6da;</i>';
    			 }
    			 goodsSection=goodsSection+'</div>';
    		 }
    	 }
    	 $("#goodsSection").html(goodsSection);
    	 
    	 var otherSection="";
    	 var goodsRemark=getCookie('goodsRemark');
    	 if(goodsRemark==undefined){
    		 goodsRemark='';
    	 }
    	 //otherSection=otherSection+' <div class="order_title">'
         //+'其他' +' </div>' +' <div class="pall15"><textarea rows="5" class="formline w100" placeholder="如果有一些特殊货物或者其他情况，请告诉司机。如：石材、易燃品等。" name="goodsRemark" >'+goodsRemark+'</textarea></div>';
	    
    	 $("#otherSection").html(otherSection);
     }
	
});


function selectGoodType(codeType,codeTypeName){
	$("#goodsType").val(codeType);
	$("#goodsTypeName").val(codeTypeName);
	
	   order2Cookie();
	  var callType=$("#callType").val();
	  if(callType=='NOW'){
		  window.location.href="../"+_global.custNowOrderUrl;
	  }else{
		  window.location.href="../"+_global.custBookOrderUrl;
	  }
}

</script>
</html>